package com.hl.design_mode.create.factory;

/**
 * @author Administrator
 */
public class ShapeFactory {

    public Object getCar(String name) {
        if (name.equalsIgnoreCase("BM")) {
            return new BM();
        } else if (name.equalsIgnoreCase("BC")) {
            return new BC();
        } else if (name.equalsIgnoreCase("YQDZ")) {
            return new YQDZ();
        }
        throw new NullPointerException();
    }
}
